package com.chen.service;

import org.apache.dubbo.config.annotation.Reference;
import org.springframework.stereotype.Service;


@Service
public class UserService {

    //从注册中心去哪
    @Reference//远程引用  pom坐标 可以定义路径相同的接口名
    TicketService ticketService;

    public void buyTicket(){
        String ticket = ticketService.getTicket();
        System.out.println("在注册中心拿到一张票");
    }

}
